package com.yc.thread.callback;

import java.util.concurrent.Callable;

/**
 * 实现 Callable 的线程启动方式
 */
public class MyCallable implements Callable<String> {

    private int threadId;

    public MyCallable(){

    }
    public MyCallable(int threadId) {
        this.threadId = threadId;
    }

    @Override
    public String call() throws Exception {
        return "当前线程id " + threadId;
    }
}
